<template>
  <div class="count">
    <h2>Count组件</h2>
    <input :value="countValue" @input="$emit('update:countValue',$event.target.value)" type="text">
  </div>
</template>

<script lang="ts">
import {defineComponent} from "vue";

export default defineComponent({
  name: "Count",
});

</script>

<script lang="ts" setup>
defineProps<{
  countValue: string
}>()
defineEmits<{
  (event: 'update:countValue'): void
}>()
</script>

<style scoped>
.count {
  background-color: pink;
}
</style>